package Java8实战._2_Stream_使用流._7_构建流;

import java.util.stream.Stream;

public class _1_由值创建流 {

    public static void main(String[] args) {

        /**
         * 创建字符串流
         */
        Stream<String> stringStream = Stream.of("Java 17", "jiangboyang", "gaofushuai", "yiquanchaoren");
        stringStream.map(String::toUpperCase)
                .forEach(System.out::println);


        /**
         * 创建一个空流
         */
        Stream<Object> empty = Stream.empty();
    }
}
